package com.albaba.designpattern.state_pattern.text_003;


/**
 * @Description: TODO
 * @Author zx
 * @Date 2025/2/25 15:54
 * @Version 1.0
 */
public class YellowState implements State {
    @Override
    public void switchToGreen(TrafficLight trafficLight) {
        System.out.println("绿灯亮起...时长：60秒");
    }

    @Override
    public void switchToYellow(TrafficLight trafficLight) {
        System.out.println("当前为黄灯，无需切换");
    }

    @Override
    public void switchToRed(TrafficLight trafficLight) {
        System.out.println("红灯亮起...时长：90秒");
    }
}
